<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="Xenon Boostrap Admin Panel" />
    <meta name="author" content="" />
    <title>打印出库单</title>
    <link rel="stylesheet" href="__BASE__/css/bootstrap.css">
    <link rel="stylesheet" href="__BASE__/css/xenon-core.css">
    <link rel="stylesheet" href="__BASE__/css/xenon-forms.css">
    <link rel="stylesheet" href="__BASE__/css/xenon-components.css">
    <link rel="stylesheet" href="__BASE__/ss/xenon-skins.css">
    <link rel="stylesheet" href="__BASE__/css/custom.css">
    <script src="__BASE__/js/jquery-1.11.1.min.js"></script>
    <script src="__BASE__/js/jQuery.print.js"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="__BASE__/js/html5shiv.min.js"></script>
    <script src="__BASE__/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="page-body">
<div class="page-container">
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-default">

                <div class="row">
                    <div class="pull-left">
                        <div class="form-group">
                            <label class="control-label">出库单名称：</label>
                            <label class="control-label">{$info.name}</label>
                        </div>
                    </div>
                </div>

                <div class="row" style="margin-top:20px;">
                    <div class="pull-left col-xs-3">
                        <div class="form-group">
                            <label class="control-label">制单人：</label>
                            <label class="control-label">{$info.author}</label>
                        </div>
                    </div>
                    <div class="pull-left col-xs-3">
                        <div class="form-group">
                            <label class="control-label">供应商：</label>
                            <label class="control-label">{$info.supplier.name}</label>
                        </div>
                    </div>
                    <div class="pull-left col-xs-3">
                        <div class="form-group">
                            <label class="control-label">仓库：</label>
                            <label class="control-label">{$info.storage.name}</label>
                        </div>
                    </div>
                    <div class="pull-left col-xs-3">
                        <div class="form-group">
                            <label class="control-label">顾客：</label>
                            <label class="control-label">
                                {switch $info.customer_id}
                                    {case 1}学生{/case}
                                    {case 2}教师{/case}
                                {/switch}
                            </label>
                        </div>
                    </div>
                </div>


                <table class="table table-striped table-bordered table-hover dataTable no-footer">
                    <thead>
                    <tr role="row">
                        <th>货物名称</th>
                        <th>单价</th>
                        <th>数量</th>
                        <th>单位</th>
                        <th>总价</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name='glist' id='g'}
                    <tr>
                        <td>
                            <label class="control-label">{$g.category.name}</label>
                        </td>
                        <td>
                            <label class="control-label">{$g.price}</label>
                        </td>
                        <td>
                            <label class="control-label">{$g.num}</label>
                        </td>
                        <td>
                            <label class="control-label">{$g.unit.name}</label>
                        </td>
                        <td>
                            <label class="control-label">{$g.total}</label>
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>

                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group no-margin">
                            <label class="control-label">备注：</label>
                            <label class="control-label">{$info.desc}</label>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <div class="form-group no-margin">
            <input type="button" class="control-label" onclick="p()">
        </div>
    </div>
</div>
</body>
</html>
<script>
    $(function(){
        p();
    });

    function p(){
        $(".page-container").print();
    }
</script>